<!--
 * @Author: zengwj
 * @Date: 2022-07-05 14:21:08
 * @LastEditors: zengwj
 * @LastEditTime: 2022-07-05 16:44:31
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div><button id="demo">click</button></div>
  <script>
    document.getElementById('demo').addEventListener('click', () => {
      console.log('冒泡')
    }, false)
    document.getElementById('demo').addEventListener('click', () => {
      console.log('捕获')
    }, true)
  </script>
</body>

</html>